
from flask import request

import json


def get_data():
    data = request.data

    if data:
        data = json.loads(data)
    else:
        data = request.form

    return data
